﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;
using System.Linq.Expressions;
namespace DAO.Bussiness
{
    interface IRepository<T> where T : class 
    {
        void Add(T entity);
        void Add(List<T> entities);
        void Delete(T entity);
        void Update(T entity);
        IEnumerable<T> All();
        IEnumerable<T> GetBy(Expression<Func<T, bool>> predicate);
        void Save();
        void LoadGrid(ref GridView grid, Expression<Func<T, bool>> predicate = null);
      
    }
}
